package com.dragon.flow.enm;

import java.io.Serializable;

/**
 * @program: flow
 * @description:
 * @author: liyue
 * @create: 2022年8月10日
 **/
public enum ActorTypeEnum implements Serializable {
    AT_USER("AT_USER", "用户"),
    AT_ROLE("AT_ROLE", "角色"),
    AT_DEPT("AT_DEPT", "单位"),
    AT_JAVA_BEAN("AT_JAVA_BEAN", "规则类实体");

    private String type;
    private String msg;

    ActorTypeEnum(String type, String msg) {
        this.msg = msg;
        this.type = type;
    }


    /**
     * 通过type获取Msg
     *
     * @param type
     * @return
     * @Description:
     */
    public static String getEnumMsgByType(Integer type) {
        for (ActorTypeEnum e : ActorTypeEnum.values()) {
            if (e.getType().equals(type)){
                return e.msg;
            }
        }
        return "";
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
